//#include<map>
#include<unordered_map>
#include<vector>
using namespace std;
class Solution {
public:
    vector<int> twoSum(vector<int>& nums, int target) {
        unordered_map<int, int> hash;
        int n = nums.size();
        for (int i = 0; i < n; i++) {
            int x = target - nums[i];
            if (hash.count(x))return { hash[x],i };
            else hash[nums[i]] = i;
        }
        return { -1,-1 };
    }
};
int main() {
    return 0;
}